# forms.py
from django import forms
from .models import Notice


class NoticeForm(forms.ModelForm):
    class Meta:
        model = Notice
        fields = ['userId', 'type', 'noticeType', 'content']  # 根据模型中的字段选择需要的字段
        widgets = {
            'content': forms.Textarea(attrs={'rows': 4, 'cols': 40}),
        }
